package com.xxy.crm.controller;

import com.xxy.crm.base.BaseController;
import com.xxy.crm.query.CustomerLossQuery;
import com.xxy.crm.service.CustomerLossService;
import com.xxy.crm.service.CustomerOrderService;
import com.xxy.crm.vo.CustomerLoss;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.Map;

@Controller
@RequestMapping("customer_loss")
public class CustomerLossController extends BaseController {
    @Resource
    private CustomerLossService customerLossService;
    /***
     * 进入客户流失管理页面
     * @param
     * @return java.lang.String
     */
    @RequestMapping("index")
    public String index() {
        return "customerLoss/customer_loss";
    }

    /**
     * 分页条件查询流失客户列表
     * @param customerLossQuery
     * @return java.util.Map<java.lang.String,java.lang.Object>
     */
    @RequestMapping("list")
    @ResponseBody
    public Map<String, Object> queryCustomerLossByParams(CustomerLossQuery customerLossQuery) {
        return customerLossService.queryCustomerLossByParams(customerLossQuery);
    }
}
